
export default {
    data() {
        return {
            title: '错误列表',
            errorList: [],
            t: [1,2],
            obj: null,
            filterParams: {
                pageNo: 1,
                browserId: '',
                errorInfo: '',
                id: '',
                projectType: '',
                systemId: '',
                selectTime: ''                
            }
        };
    },
    computed: {

    },
    methods: {
        async init (){
            await this.getErrorList();
        },

        /**
         * 搜索
        */
        search () {
            this.getErrorList();
        },

        /**
         * 获取错误列表
        */
        getErrorList (params) {
            const that = this;
            return new Promise ((resolve, reject)=>{
                this.$axios.get('/api/getRecordList', {params: that.filterParams}).then((res)=>{
                    console.log(res)
                    if(res.data.success){
                        that.errorList = res.data.data;
                    }else{
                        that.errorList = [];
                    }
                    resolve(res.data.data)
                })
            })
        },
        /**
         * 分页
         * @param {*} val 
         */ 
        handleSizeChange(val) {
            console.log(`每页 ${val} 条`);
        },
        handleCurrentChange(val) {
            this.filterParams.pageNo = val;
            this.getErrorList();
            console.log(`当前页: ${val}`);
        }
    },
    mounted() {
        // console.log(res)
        this.init();
    }
};
